<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="../../tpl/head.jsp"%>
<link rel="stylesheet/less" type="text/css" href="statics/less/email/index.less" />
<script src="statics/lib/extend/less.min.js"></script>
<script src="statics/lib/extend/tipso.min.js"></script>
<script src="statics/lib/extend/mock-min.js"></script>
<link rel="stylesheet" href="statics/lib/extend/tipso.min.css">
<style>
	@font-face {
		font-family: 'iconfont';  /* project id 2194848 */
		src: url('//at.alicdn.com/t/font_2194848_mweftusyij.eot');
		src: url('//at.alicdn.com/t/font_2194848_mweftusyij.eot?#iefix') format('embedded-opentype'),
		url('//at.alicdn.com/t/font_2194848_mweftusyij.woff2') format('woff2'),
		url('//at.alicdn.com/t/font_2194848_mweftusyij.woff') format('woff'),
		url('//at.alicdn.com/t/font_2194848_mweftusyij.ttf') format('truetype'),
		url('//at.alicdn.com/t/font_2194848_mweftusyij.svg#iconfont') format('svg');
	}
	.layui-tree-pack{
		/*height: 400px;*/
		overflow-y: auto;

	}
</style>
<script>
	$(function(){
		jQuery('#email').tooltip({
			text: '邮件'
		});
		jQuery('#customer').tooltip({
			text: '邮箱管理'
		});
		jQuery('#supplier').tooltip({
			text: '客户箱'
		});

		$(".search").click(function(){
			$(".searchBox").toggle();
		});
	});
</script>
<div class="page">
	<div class="layui-card-header layui-bg-cyan">
		<span>邮件</span>
		<div class="center" style="width:160px">
			<div class="search"><i style="font-size:18px;">&#xe601;</i>搜索</div>
			<div class="split"></div>
			<div id="gaoji">高级</div>
		</div>
		<div class="right">
			<button type="button" class="layui-btn layui-btn-danger layui-btn-sm" style="margin-right:10px;" id="statistical">统计</button>
		</div>
	</div>
	<div class="layui-card-body">
		<div class="bar">
			<button type="button" class="layui-btn layui-btn-primary layui-btn-sm" id="shouxin">收信</button>
			<button type="button" style="text-align: center" class="layui-btn layui-btn-normal layui-btn-sm" lay-href="views/jsp/BasicData/email/write.jsp"> 写信 </button>
<%--			<a href="views/jsp/BasicData/email/write.jsp" style="width: 120px;text-align: center" class="layui-btn layui-btn-normal layui-btn-sm">写信</a>--%>

			<a style="margin:0 10px 0 160px;" href="javascript:void(0)"><i>&#xe649;</i></a>
			<form class="layui-form layui-from-pane layui-input-inline">
				<select class="layui-btn-sm" lay-filter="user-pop3" id="user-pop3">
					<option value="全部">全部邮箱</option>
				</select>

			</form>
			<div class="baryc">
				<a style="cursor: pointer" tooltip="移动到" lay-filter="yidongMenu" id="emailMove"><i>&#xe624;</i>移动到</a>
				<a style="cursor: pointer" tooltip="回复" lay-dropdown="{template: 'huifuMenu'}"><i>&#xe609;</i>回复</a>
				<a style="cursor: pointer" tooltip="归并"  onclick="inclouding()"><i>&#xe62d;</i>归并</a>
				<a style="cursor: pointer" tooltip="标记为" lay-filter="biaojiMenu" lay-dropdown="{templateMenu: 'biaojiMenu'}"><i>&#xe627;</i>标记为</a>
				<a style="cursor: pointer" tooltip="标记为垃圾邮件" id="putLitter"><i>&#xe624;</i>标记为垃圾邮件</a>
				<a style="cursor: pointer" tooltip="删除" id="deleteEmails"><i>&#xe614;</i>删除</a>
				<a style="cursor: pointer" tooltip="更多" lay-filter="gengduoMenu" lay-dropdown="{templateMenu: 'gengduoMenu'}"><i>&#xe65b;</i>更多</a>
				<a style="cursor: pointer" tooltip="取消" onclick="qx()"><i>|</i>取消</a>
			</div>
			<div class="right">
				主题前置<input type="radio" name="subject" runat="server" value="只读" onclick="changeprePost(0)" checked= true/>
				主题后置<input type="radio" name="subject" runat="server" value="只读" onclick="changeprePost(1)"/>
				锁定只读<input type="radio" name="type" runat="server" value="只读" onclick="OnChanged(1)" checked= true/>
				不锁只读<input type="radio" name="type" runat="server" value="只读" onclick="OnChanged(0)"/>
				<a href="javascript:void(0)" id="fresh"><i>&#xe628;</i>刷新</a>
				<a style="cursor: pointer"  lay-filter="gengduoMenu2" lay-dropdown="{templateMenu: '#gengduoMenu2'}"><i>&#xe65b;</i>更多</a>
				<a href="javascript:void(0)"><i>&#xe617;</i></a>
				<a style="cursor: pointer"  lay-filter="settingMuen" lay-dropdown="{template: '#settingMuen'}"><i>&#xe622;</i>&nbsp;<i>&#xe62b;</i></a>
			</div>
		</div>
		<div class="mc">
			<div>
				<div class="layui-tab layui-tab-card" lay-filter="test1">
					<ul class="layui-tab-title">
						<li class="layui-this" lay-id="email">
							<i id="email" onclick="resetControl(0)">&#xe602;</i>
						</li>
						<li  lay-id="customer">
							<i id="customer" onclick="resetControl(1)">&#xe6ad;</i>
						</li>
						<li lay-id="supplier">
							<i id="supplier" onclick="resetControl(2)">&#xe645;</i>
						</li>
					</ul>
					<div class="layui-tab-content">
						<div class="layui-tab-item layui-show">
							<ul class="layui-nav layui-nav-tree layui-fluid" style="width:100%;">
								<li class="layui-nav-item"><a id ="num0" href="javascript:void(0)" onclick="changeleftPage('收件')">收件箱</a></li>
								<li class="layui-nav-item"><a id ="num1" href="javascript:void(0)" onclick="changeleftPage('星标')">星标邮件</a></li>
								<li class="layui-nav-item"><a id ="num2" href="javascript:void(0)" onclick="changeleftPage('未读')">未读箱</a></li>
								<li class="layui-nav-item"><a id ="num3" href="javascript:void(0)" onclick="changeleftPage('草稿')">草稿箱</a></li>
								<li class="layui-nav-item"><a id ="num4" href="javascript:void(0)" onclick="changeleftPage('待发')">待发箱</a></li>
								<li class="layui-nav-item"><a id ="num5" href="javascript:void(0)" onclick="changeleftPage('群发')">群发箱</a></li>
								<li class="layui-nav-item"><a id ="num8" href="javascript:void(0)" onclick="changeleftPage('系统已发')">系统已发箱</a></li>
								<li class="layui-nav-item"><a id ="num6" href="javascript:void(0)" onclick="changeleftPage('已发')">已发箱</a></li>
								<li class="layui-nav-item"><a id ="num7" href="javascript:void(0)" onclick="changeleftPage('垃圾')">垃圾箱</a></li>
								<li class="layui-nav-item"><a id ="num9" href="javascript:void(0)" onclick="changeleftPage('归并')">已归并箱</a></li>
								<%--<li class="layui-nav-item"><a id ="num8" href="javascript:void(0)" onclick="changeleftPage('回收')">回收箱</a></li>--%>
								<li class="layui-nav-item" id="contacts">
									<a href="javascript:;" class="activelink">
										内部联系人箱
<%--										<i style="float:right;" class="youcanaddemail" data-type = "1">&#xe60f;</i>--%>
									</a>
									<div id="contacts_content" style="display: none">
										<div id="test6" style="font-size:12px;display: flex;justify-content: space-between" class="demo-tree"></div>
									</div>

								</li>
								<li class="layui-nav-item" id="searchBox">
									<a href="javascript:;">
										查询箱
										<i style="float:right;" class="youcanaddemail" data-type = "2">&#xe60f;</i>
									</a>
								</li>
								<li class="layui-nav-item" id="userBox">
									<a href="javascript:;">
										自定义箱
										<i style="float:right;" class="youcanaddemail" data-type = "3">&#xe60f;</i>
									</a>
								</li>
							</ul>
						</div>
						<div class="layui-tab-item">
							<div style="display: flex">
								<button class="layui-btn layui-btn-sm  layui-btn-submit" onclick="regress()">返回当前登录用户</button>
							</div>
							<div id="test4" style="font-size:12px" class="demo-tree"></div>
						</div>
						<div class="layui-tab-item ">
								<div class="xm-select">
									<input id="customsearchs2" style="width: 100%" value="" class="layui-hide"/>
								</div>
							<button class="layui-btn layui-btn-sm layui-btn-submit" lay-submit="" lay-filter="submitform" style="margin-left: 10px">搜索</button>
							<div id="test5" style="font-size:12px" class="demo-tree"></div>
						</div>
					</div>
				</div>
			</div>
			<div style="overflow: auto">
				<table class="_email_table" id="email_table" lay-skin="line" lay-filter="email_table"></table>
			</div>
		</div>
	</div>
	<!-- <div class="fast_priview">
       <div class="close">
           <i id="closeFast" class="layui-icon layui-icon-close"></i>
       </div>
   </div>  -->

	<div class="searchBox">
		<div class="box01">
			<input type="text" id="tip" placeholder="主题、发件人、收件人模糊查询">
			<i class="icon" id="searchBtn">&#xe601;</i>
		</div>
	</div>

</div>
<div style="display:none;">
	<span id="xjt">&#xe6cc;</span>
	<span id="yjt">&#xe633;</span>
</div>
<div id="BadgeWindow" style="display: none;">
	<div class="badge-window">
		<div>
			<input type="text" placeholder="标签名称">
		</div>
		<div>
			<input type="checkbox" checked><span class="layui-badge badge">标签1</span><br>
			<input type="checkbox"><span class="layui-badge badge">标签2</span>
		</div>
		<div>
			<a onclick="showCreateBadgeWindow()"><i class="icon">&#xe60f;</i>新增</a>
			<a onclick="layer.closeAll()">取消选中</a>
			<a onclick="layer.closeAll()">确认</a>
		</div>
	</div>
</div>

<div id="BadgeWindow" style="display: none;"><div class="badge-window"><div><input type="text" placeholder="标签名称"></div><div>
	<input type="checkbox" checked><span class="layui-badge badge">标签1</span><br>
	<input type="checkbox"><span class="layui-badge badge">标签2</span>
</div><div><a onclick="showCreateBadgeWindow()"><i class="icon">&#xe60f;</i>新增</a><a onclick="layer.closeAll()">取消选中</a><a onclick="layer.closeAll()">确认</a></div></div></div>

<div id="CreateBadgeWindow" style="display: none;">
	<form class="layui-form" action="" style="padding:20px;">
		<div class="layui-form-item">
			<label class="layui-form-label">名称</label>
			<div class="layui-input-block">
				<input id="tagTitle" type="text" name="title" lay-verify="title" autocomplete="off" placeholder="请输入名称" class="layui-input">
			</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label">颜色</label>
			<div class="layui-input-inline" style="width: 120px;">
				<input type="text" value="" placeholder="请选择颜色" class="layui-input" id="test-form-input">
			</div>
			<div class="layui-inline" style="left: -11px;">
				<div id="test-form"></div>
			</div>
		</div>
	</form>
</div>


<script id="biaojiMenu"  type="text/html">
	[
	[{txt: "未读", event: "noready"}]
	[{txt: "已读", event: "ready"}]
	[{txt: "星标", event: "star"}]
	[{txt: "点击取消星标", event: "nostar"}]
	]
</script>

<script id="gengduoMenu"  type="text/html">
	[
	[{txt: "内部转发、分发", event: "internalforwarding"}]
	]
</script>

<script id="gengduoMenu2"  type="text/html">
	[
	[{txt: "全部设置为已读", event: "allread"}]
	[{txt: "归并已回复的邮件", event: "incloudAnswer"}]
	[{txt: "归并已读邮件", event: "incloudRead"}]
	[{txt: "删除重复邮件", event: "deleteMuchEmail"}]
	]
</script>


<script id="yidongMenu"  type="text/html">
	<div style="display:flex;">
		<div style="width: 160px;" class="moremune">
			<div class="menu-item">
				<a href="javascript:;" lay-event="emailsettings" onclick="changeEmailsClass(2)"><span class="">收件箱</span></a>
			</div>
			<div class="menu-item">
				<a href="javascript:;" lay-event="emailsettings" onclick="changeEmailsClass(3)"><span class="">草稿箱</span></a>
			</div>
			<div class="menu-item">
				<a href="javascript:;" lay-event="alreadysentbox" onclick="changeEmailsClass(4)"><span class="">待发箱</span></a>
			</div>
			<div class="menu-item">
				<a href="javascript:;" lay-event="alreadysentbox" onclick="changeEmailsClass(1)"><span class="">群发箱</span></a>
			</div>
			<div class="menu-item">
				<a href="javascript:;" lay-event="alreadysentbox" onclick="changeEmailsClass(5)"><span class="">已发箱</span></a>
			</div>
			<div class="menu-item">
				<a href="javascript:;" lay-event="alreadysentbox" onclick="changeEmailsClass(6)"><span class="">垃圾箱</span></a>
			</div>
			<div class="menu-item">
				<a href="javascript:;" lay-event="alreadysentbox" onclick="changeEmailsClass(7)"><span class="">回收箱</span></a>
			</div>
		</div>
		<div class="moremune">
			内部联系人箱
			<div class="showMoreBox" style="width: 130px;max-height: 250px;overflow: auto" id="moveEmailPeople">

			</div>
			<hr>
			自定义箱
			<div class="showMoreBox" style="width: 130px;max-height: 80px;overflow: auto" id="moveEmailBoxs">

			</div>
		</div>

	</div>


</script>

<script id="modify"  type="text/html">
	<div style="display:flex;">
		<div style="width: 160px;" class="moremune">
			<div class="menu-item">
				<a href="javascript:;" lay-event="modifybox" data-id="{{d.id}}"><i class="layui-icon layui-icon-username"></i>&nbsp;<span class="">修改</span></a>
			</div>
			<div class="menu-item">
				<a href="javascript:;" lay-event="delbox" data-id="{{d.id}}"><i class="layui-icon layui-icon-set"></i>&nbsp;<span class="">删除</span></a>
			</div>
		</div>
	</div>
</script>
<script id="huifuMenu"  type="text/html">
	<div style="display:flex;">
		<div style="width: 160px;" class="moremune">
			<div class="menu-item">
				<a href="javascript:;" lay-event="emailanswer" onclick="answer(0)"><span class="">回复</span></a>
			</div>
			<div class="menu-item">
				<a href="javascript:;" lay-event="emailanswer" onclick="answer(1)"><span class="">回复（带全文）</span></a>
			</div>
			<div class="menu-item">
				<a href="javascript:;" lay-event="emailanswer" onclick="answer(2)"><span class="">回复（带附件文）</span></a>
			</div>
		</div>
	</div>
</script>
<script id="settingMuen" type="text/html">
	<div style="display:flex;">
		<div style="width: 160px;" class="moremune">
			<div class="menu-item">
				<a href="javascript:;" lay-event="emailsettings"><span class="">邮箱设置</span></a>
			</div>
			<div class="menu-item">

		</div>
	</div>
	</div>
</script>
<%@ include file="../../tpl/foot.jsp"%>
<script src="statics/lay/modules/tagsInput.js"></script>
<script>layui.use(["index"])</script>
<script src="statics/js/BasicData/email/email_data.js"></script>


